/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Banner
- Modal
- Tabs
- Main Dashboard Tab
- Measurement Tab
- Tables/Dropdown
- Containers
- Media Queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#app-container * {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}

body {
  background-color: #1e2130;
  color: #f3f5f4;
  font-family: "Open Sans", sans-serif;
  width: 100%;
  height: 100vh;
  max-width: 100% !important;
  overflow-x: hidden;
  margin: 0;
}

#big-app-container {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6rem;
}

.banner {
  height: fit-content;
  background-color: #1e2130;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #4B5460;
  padding: 1rem 10rem;
  width: 100%;
}


.banner h5 {
  font-family: 'Open Sans Semi Bold', sans-serif;
  font-weight: 500;
  line-height: 1.2;
  font-size: 2rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.banner h6 {
  font-size: 1.6rem;
  line-height: 1;
}

.banner button {
  color: #95969A;
  margin-right: 10px;
  height: 3rem;
  line-height: 3rem;
}

#banner-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.banner button:hover {
  color: #92e0d3;
  border-color: whitesmoke;
}

.banner Img {
  height: 3rem;
  margin: 0px 10px;
}

/* The Modal (background) */
.modal {
  display: none; /*Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1005; /* Sit on top */
  left: 0;
  top: 0;
  width: 100vw; /* Full width */
  height: 100vh; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.markdown-container {
  width: 60vw;
  margin: 10% auto;
  padding: 10px 15px;
  background-color: #2d3038;
}

.close-container {
  width: 100%;
  margin: 0;
  padding: 0;
  height: 40px;
}

.closeButton {
  padding: 0 15px;
  font-weight: normal;
  float: right;
  height: 100%;
  border: none;
}

.closeButton:hover {
  color: #91dfd2;
}

/* Tabs
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#tabs {
  width: 100%;
}

.custom-tabs {
  background-color: #1E2130;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  height: fit-content;
  cursor: pointer;
}

#Specs-tab.custom-tab, #Control-chart-tab.custom-tab {
  background-color: #161a28;
  letter-spacing: 1px;
  color: inherit;
  border: 0;
  border-bottom: #1E2130 solid 4px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 18px;
}

#Specs-tab.custom-tab--selected, #Control-chart-tab.custom-tab--selected {
  border-bottom: #91dfd2 solid 4px !important;
}

#Specs-tab.custom-tab {
  margin-right: 3px;
}

#Control-chart-tab.custom-tab {
  margin-left: 3px;
}

.section-banner {
  color: darkgray;
  font-size: 1.5rem;
  text-align: left;
  padding: 1rem 2rem;
  border-bottom: 1px solid #4b5460;
}

/* Main Dashboard Tab
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#top-section-container {
  height: 40rem;
  flex-direction: row;
  display: flex;
  max-width: 100%;
  /*width: 100%;*/
}

#metric_header > div {
  font-weight: bold;
  font-size: 1.35rem;
  line-height: 3rem;
}

#m_header_5 {
  margin-top: 0rem !important;
}

.metric-row {
  font-size: 1.3rem;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center; /* vertical center row items*/
}

.metric-row:hover {
  background-color: #0F1328;
}

/*Dash Daq Graduatebar */
#Diameter_OOC_graph > div > div,
#Etch1_OOC_graph > div > div,
#Film-Thickness_OOC_graph > div > div,
#Metric4_OOC_graph > div > div,
#Etch2_OOC_graph > div > div,
#Line-Width_OOC_graph > div > div,
#Overlay_OOC_graph > div > div,
#Volume_OOC_graph > div > div {
  width: 100%;
  background-color: #1e2130 !important;
}

#quick-stats.row {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

#control-chart-container {
  position: relative;
  z-index: 4;
  width: 100%;
  border-top: #1E2130 solid 0.8rem;
}

#metric-summary-session {
  height: 100%;
  flex: 1 1 auto;
}

#ooc-piechart-outer {
  height: 100%;
  margin: 0;
  border-left: #1E2130 solid 0.8rem;
  flex: 1 1 auto;
}

#piechart.plot-container plotly {
  height: 100%;
}

#card-1, #card-2, #utility-card {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  margin: 0;
  padding: 0;
  width: 100%;
}

#card-1 {
  margin-bottom: 3rem;
}

#utility-card {
  height: 4rem !important;
  margin-top: 2rem;
}

#stop-button > div > button:hover {
  color: #91dfd2 !important;
}

/* Tab1 content
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#set-specs-intro-container {
  font-weight: bold;
  margin: 8rem 5rem 1rem;
  font-size: 1.6rem;
}


#metric-select-title {
  color: darkgray;
}

#button-div {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

#value-setter-view-btn {
  margin-left: 20px;
}

#value-setter-panel {
  line-height: 2;
}

#value-setter-panel-header {
  font-weight: bold;
  color: darkgray;
  line-height: 1;
  padding: 2rem 0;
  border-bottom: 1px solid #4b5460;
}

#value-setter-panel-header > div {
  text-align: right;
}

#value-setter-view-btn, #value-setter-set-btn {
  border: 1px solid #4B5460;
  color: darkgray;
}

#value-setter-set-btn:hover, #value-setter-view-btn:hover {
  color: #91dfd2;
  border-color: white;
}

#value-setter-panel-usl, #value-setter-panel-lsl, #value-setter-panel-ucl, #value-setter-panel-lcl {
  padding: 1rem 0;
}

.output-datatable {
  margin: 2rem 0rem 2rem 2rem;
  line-height: 3;
  align-self: flex-end;
  width: 80%;
}

/*Dropdown*/
.setting-input {
  width: 100% !important;
  height: 100%;
}

.react-numeric-input, .react-numeric-input input {
  width: 100% !important;
}

.react-numeric-input input {
  background-color: #242633 !important;
  border-color: darkgray !important;
  color: white !important;
}

.react-numeric-input b:nth-child(2) i {
  border-color: transparent transparent white !important;
}

.react-numeric-input b:nth-child(3) i {
  border-color: white transparent transparent !important;
}


/* Dropdown
----------------------------------------------*/

/*Dropdown items*/
.Select-control, .Select-multi-value-wrapper, .Select-menu-outer div {
  background-color: #242633;
}

/*Dropdown items*/
.Select-control, .Select, .Select-value-label, .Select-clear-zone {
  color: white;
}


/*Dropdown items*/
.Select-menu-outer {
  background-color: #242633;
  border: 1px solid darkgray !important;
}

/*Dropdown items*/
.Select-menu-outer div:hover {
  background-color: rgba(36, 38, 51, 0.5) !important;
  cursor: pointer;
}

/*Dropdown arrow + delete button*/
.Select-control, .Select-control > span {
  color: white;
  background: #242633 !important;
}

/*Placeholder*/
.Select.has-value.Select--single > .Select-control .Select-value .Select-value-label, .Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {
  color: white !important;
}

/*Placeholder*/
.Select--single > .Select-control .Select-value, .Select-placeholder {
  /*border: 1px solid darkgray;*/
  border-radius: 4px;
  background-color: #242633;
  cursor: pointer;
}


.Select.is-focused:not(.is-open) > .Select-control {
  border-color: #91dfd2 !important;
}

/* Container
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#app-container {
  background: #161a28;
  margin: 1rem 2rem;
  max-width: 100%;
  width: 100%;
  height: calc(100vh - 10rem - 1px);
}

#app-content {
  background: inherit;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

#settings-menu {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-evenly;
  margin: 4rem 5rem 1rem;
}

#metric-select-menu {
  flex: 1 1 0;
}

#value-setter-menu {
  flex: 1 1 30%;
  margin-left: 5rem;
  display: flex;
  flex-direction: column;
}

#status-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 0;
  padding: 0;
}

#graphs-container {
  display: flex;
  flex-direction: column;
  flex: 3 1;
  max-width: calc(75%);
  width: 70%;
}


/* Tab 2 Quick stats
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#quick-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-right: #1E2130 solid 0.8rem;
  flex: 1 1;
  padding: 2rem;
  max-width: 25%;
}

#operator-led {
  width: 200px;
}

#operator-led > div {
  width: 80%;
  margin: auto;
}

#operator-led > div > div {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

#operator-led > div > div svg:nth-child(1) {
  margin-left: -1rem;
}

#progress-gauge > div, #progress-gauge > div > div, #progress-gauge > div > div > div {
  width: 100%;
  text-align: center;
}

#progress-gauge svg {
  width: 80%;
  height: auto;
}

#progress-gauge > div > div > div > div {
  color: white !important;
}

/*pressure-gauge track*/
.eUJyCY .track {
  stroke: #f4d44d !important;
  stroke-width: 10;
}

.eUJyCY .track.progress {
  stroke: #fff3c5 !important;
}

/* Tab 2 Specs
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#stop-button > div > button {
  color: white !important;
  background-color: #1d202d !important;
  border: 1px solid #4B5460 !important;
  border-radius: 4px;
  height: 40px;
  line-height: 40px;
}

#stop-button > div > button:hover {
  color: #91dfd2 !important;
  border-color: white !important;
  background-color: #1d202d !important;
}

#card-1 P, #card-2 P {
  margin: 2rem;
  color: inherit;
  font-weight: bold;
  align-self: flex-start;
}

#card-2 .scale, #card-2 .needle, #card-2 .needle-knob {
  display: none !important;
}

/* Tab 2 metric row
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.metric-row-button {
  border: none;
  padding: 0px 0px;
  color: #95969A;
  font-size: 1rem;
  letter-spacing: 0.02rem;
}

.metric-row-button:hover {
  border: none;
  color: white !important;
}

#metric-div {
  padding: 1rem 2rem 1rem 1rem;
}

#metric-rows {
  overflow-y: scroll;
  width: 100%;
  height: 30rem;
}

/*
  ##Device = Most of the Smartphones Mobiles / ipad (Portrait)
  */
@media only screen and (max-width: 950px) {

  body {
    font-size: 1.3rem;
  }

  #big-app-container {
    padding: 1rem;
  }

  .banner {
    flex-direction: column-reverse;
    padding: 1rem 0.5rem;
  }

  #banner-text {
    text-align: center;
  }

  .banner h5 {
    font-size: 1.4rem;
  }

  .banner h6 {
    font-size: 1.3rem;
  }

  #banner-logo button {
    display: none;
  }

  .banner Img {
    height: 3rem;
    margin: 1rem;
  }

  #app-container {
    height: auto;
  }

  #set-specs-intro-container {
    margin: 4rem 2rem 0rem 2rem;
    font-size: inherit;
  }

  #settings-menu {
    margin: 2rem;
    flex-direction: column;
  }

  #settings-menu > div {
    width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    flex-basis: auto;
    margin: 2rem 0rem;
  }

  #value-setter-panel-header {
    display: none;
  }

  #button-div {
    display: block;
    text-align: center;
  }

  #button-div button {
    margin: 1rem auto;
    display: block;
  }

  .output-datatable {
    align-self: center;
    margin: 2rem;
  }

  #status-container, #top-section-container {
    flex-direction: column;
    height: auto;
  }

  #quick-stats {
    max-width: 100%;
  }

  #graphs-container {
    flex: 1;
    max-width: 100%;
    width: 100%;
  }

  #top-section-container > div {
    width: 100%;
    height: auto;
  }

  #card-1 P, #card-2 P {
    align-self: auto;
  }

  /*Removing borders}*/
  #ooc-piechart-outer {
    border-left: none;
  }

  #quick-stats {
    border-right: none;
  }

}

@media only screen and (max-width: 600px) {
  /* Display measurement row contents block-level on mobile*/
  /** Display every row content in block*!*/
  #metric_header {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  #metric-rows {
    height: fit-content;
  }

  #value-setter-panel {
    line-height: 2.5;
  }

  .metric-row {
    flex-direction: column;
    height: fit-content !important;
    justify-content: space-between;
    align-items: flex-start;
    border-top: 1px solid #1E2130;
    border-bottom: 1px solid #1E2130;
  }

  #metric-rows .column, #metric-rows .columns {
    width: 100% !important;
    float: none;
    margin: 0.25rem 0 !important;
    padding-left: 50%;
    position: relative;
  }

  #metric-rows .column:before, #metric-rows .columns:before {
    /* Now like a table header */
    position: absolute;
    /* Top/left values mimic padding */
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
  }

  /** Attach header vertically to table */
  .metric-row > div {
    height: 30px;
    line-height: 30px;
    text-align: center;
  }

  /*Hide Sparkline*/
  .metric-row > div:nth-of-type(3) {
    display: none;
  }

  .metric-row > div:nth-of-type(6) > div {
    margin-top: 6.5px !important;
  }

  /*Add table header column*/
  .metric-row > div:nth-of-type(1):before {
    content: "Parameter";
  }

  .metric-row > div:nth-of-type(2):before {
    content: "Total Measurement";
  }

  .metric-row > div:nth-of-type(3):before {
    content: "   ";
  }

  .metric-row > div:nth-of-type(4):before {
    content: "OOC %";
  }

  .metric-row > div:nth-of-type(5) {
    margin-top: 0 !important;
  }

  .metric-row > div:nth-of-type(5):before {
    content: "Out of Control";
  }

  .metric-row > div:nth-of-type(6):before {
    content: "Pass / Fail";
  }

  .output-datatable {
    width: auto;
  }
}

@media screen and (max-width: 800px) {
  #Specs-tab.custom-tab {
    margin-right: 0;
  }

  #Control-chart-tab.custom-tab {
    margin-left: 0;
  }
}
